//
//  AliMNSHttpBodyDecoder.h
//  AlibabaCloudMNSiOS
//
//  Created by David Chen on 28/03/2017.
//  Copyright © 2017 AliCloud. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "AliMNSQueueMeta.h"
#import "AliMNSMessage.h"
#import "AliMNSTopicMeta.h"
#import "AliMNSSubscription.h"

@interface AliMNSHttpBodyDecoder : NSObject
+ (void) parseQueueMetaFromDict:(NSDictionary*) tmpDict
            withOutputQueueMeta:(AliMNSQueueMeta*) qMeta;

+ (void) parseMessageFromDict:(NSDictionary*) dict
            withOutputMessage:(AliMNSMessage*) msg;

+(void) parseTopicMetaFromDict:(NSDictionary*) dict
           withOutputTopicMeta:(AliMNSTopicMeta*) tMeta;

+ (void) getQueueListFromXml:(NSData*) xmlData
            withOutputMarker:(NSString**)marker
     withOutputQueueMetaList:(NSMutableArray**) qMetaList;

+ (void) getQueueMetaFromXml:(NSData*) xmlData
         withOutputQueueMeta:(AliMNSQueueMeta*)qMeta;

+ (void) getMessageFromXml:(NSData*)xmlData
         withOutputMessage:(AliMNSMessage*) msg;

+ (void) getMessageListFromXml:(NSData*) xmlData
         withOutputMessageList:(NSMutableArray*) msgList;

+ (void) getTopicMetaFromXml:(NSData*) xmlData
         withOutputTopicMeta:(AliMNSTopicMeta*)tMeta;

+ (void) getTopicListFromXml:(NSData*) xmlData
            withOutputMarker:(NSString**)marker
     withOutputTopicList:(NSMutableArray**) topicList;

+ (void) getSubscriptionFromXml:(NSData*) xmlData
     withOutputSubscriptionMeta:(AliMNSSubscription*)subMeta;

+ (void) getSubscriptionListFromXml:(NSData*) xmlData
                   withOutputMarker:(NSString**)marker
         withOutputSubscriptionList:(NSMutableArray**) subList;

+ (void) getNextVisibilityFromXml:(NSData*) xmlData
     withOutputNextVisibilityTime:(NSString**) nextTime
          withOutputReceiptHandle:(NSString**) rHandle;

+ (void) getErrorCodeFromXml:(NSData*) xmlData
              withOutputCode:(NSString**) code
           withOutputMessage:(NSString**) message
         withOutputRequestId:(NSString**) requestId
            withOutputHostId:(NSString**) hostId;
@end



